<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">  
    <title>菜单</title>
</head> 
  <body>
    	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="main_table">
		<tr class="main_head">
			<th>序号</th>
			<th style="width:50%;">名称</th>
			<th>资源路径</th>
			<th>操作</th>
		</tr>
		<c:choose>
			<c:when test="${not empty menuList}">
				<c:forEach items="${menuList}" var="menu" varStatus="vs">
				<tr class="main_info" id="tr${menu.menuid }">
				<td>${menu.menuid}</td>
				<td>${menu.menuname }</td>
				<td>${menu.url}</td>
				<td><a href="savemenu.jsp">增加 </a> 
				<a href="#" onclick="editmenu(${menu.menuid })">修改</a>
				<a href="#" onclick="delmenu(${menu.menuid },true)">删除</a></td>
				</tr>
				</c:forEach>
			</c:when>
			<c:otherwise>
				<tr class="main_info">
				<td colspan="4">没有相关数据</td>
				</tr>
			</c:otherwise>
		</c:choose>
	</table>
  </body>
</html>